package com.yanzhenjie.hos;

import com.yanzhenjie.andserver.AndServer;
import com.yanzhenjie.andserver.MyApplication;
import com.yanzhenjie.andserver.Server;
import ohos.aafwk.ability.delegation.AbilityDelegatorRegistry;
import org.junit.Test;

import java.util.concurrent.TimeUnit;

import static org.junit.Assert.assertEquals;

public class ExampleOhosTest {

    @Test
    public void test() {
        Server server = AndServer.webServer(MyApplication.getInstance().getContext())
                .port(8080)
                .timeout(10, TimeUnit.SECONDS)
                .build();
        assertEquals(8080, server.getPort());

    }
}